﻿Imports MindFusion.Diagramming
Imports MindFusion.Drawing

Public Class ClsMMNodeForNewLink
    Inherits ShapeNode
    'represents node for creating a links - it is attached to another nodes in diagram

#Region "Attributes"
#Region "Private attributes"
#End Region
#End Region
#Region "Constructors"
    Public Sub New(ByVal IoBounds As RectangleF)
        MyBase.New()
        MMSetDefaultProperties()
        Me.Bounds = New RectangleF(IoBounds.Right + 0.6, IoBounds.Top, 5, 5)
    End Sub

    Public Sub New()
        MyBase.New()
        MMSetDefaultProperties()
    End Sub

    Public Sub New(ByVal IiID As Integer)
        MyBase.new()
        MMSetDefaultProperties()
    End Sub

    Public Sub New(ByVal parent As MindFusion.Diagramming.Diagram)
        MyBase.New(parent)
        MMSetDefaultProperties()
    End Sub

    Public Sub New(ByVal prototype As MindFusion.Diagramming.DiagramItem)
        MyBase.New(prototype)
    End Sub

    Public Sub New(ByVal prototype As MindFusion.Diagramming.DiagramNode)
        MyBase.New(prototype)
    End Sub

    Public Sub New(ByVal prototype As MindFusion.Diagramming.ShapeNode)
        MyBase.New(prototype)
    End Sub
#End Region
#Region "Properties"
#Region "Public properties"
#End Region
#End Region
#Region "Subs"
#Region "Overrides & Overloads Subs"
#End Region
#Region "MM Subs"
    'default settings of shape
    Public Sub MMSetDefaultProperties()
        Me.Shape = Shapes.Arrow3
        Me.EnabledHandles = AdjustmentHandles.None
        Me.IgnoreLayout = True 'whether the position of this item should not be changed by automatic layout methods
        Me.Obstacle = False ' whether this node is considered an obstacle by the link-routing algorithm
        Me.Bounds = SDRectangleVirginCreator(0, 0, 5, 5)
        Me.EnableStyledText = True 'whether styled text rendering is enabled
        Me.CustomDraw = CustomDraw.Additional 'The custom painting code executes after item's interior and frame are painted by FlowChart.NET, but before text is rendered. In this mode, the Graphics instance passed to the custom drawing event handler has a clipping region applied to it
        Me.Font = New Font("Arial", 8, FontStyle.Regular) 'font used to render the node's text
        Me.AllowIncomingLinks = False
        Me.AllowOutgoingLinks = False
        Me.Brush = New LinearGradientBrush(Color.LightGray, Color.Gray, 45) 'brush is used to fill the interiors of geometric shapes
        Me.Pen = New Pen("0/#FF696969/0/0/0//0/0/10/") 'pen is used to draw the outline of geometric shapes
        Me.HandlesStyle = HandlesStyle.Invisible 'visual styles for frames that are drawn around selected nodes
        Me.ShadowOffsetX = 0.5 'horizontal offset of the shadow
        Me.ShadowOffsetY = 0.5 'vertical offset of the shadow
        'Me.ImageAlign = ImageAlign.MiddleRight 'the position and alignment of a picture relative to its destination rectangle
        Me.Text = GsStringDefaultValue 'the text displayed inside the shape node
        Me.Visible = False
    End Sub
#End Region
#End Region

End Class
